How to fix skipped frames